package com.maple.soa.service;

import com.maple.soa.dao.UserDao;
import com.maple.soa.pojo.People;
import com.maple.soa.pojo.Student;
import com.maple.soa.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

import java.util.List;

/**
 * @author lijian
 * @date 2020/7/4
 */
public class UserService {
    @Autowired
    @Qualifier("userDao123")
    private UserDao userDao;
    @Autowired
    private Student student;
    @Autowired(required = false)
    private People people;

    public void listUser() {
        userDao.getUsers().forEach(user -> {
            System.out.println(user.toString());
        });
    }

    public void getStudent() {
        System.out.println(student);
    }
}
